﻿<form class="form-horizontal" role="form" name="editForm" ng-show="isVisible" ng-controller="editCtrl" show-validation>
    <div class="form-group" ng-if="item.Id">
        <label for="id" class="col-sm-1 control-label">Id</label>
        <div class="col-sm-3">
            <div class="form-control-static">{{item.Id}}</div>
        </div>
    </div>
    <div class="form-group">
        <label for="name" class="col-sm-1 control-label">Name</label>
        <div class="col-sm-3">
            <input type="text" class="form-control" id="Name" ng-model="item.Name" required />
        </div>
    </div>
    <div class="form-group">
        <label for="name" class="col-sm-1 control-label">Code</label>
        <div class="col-sm-3">
            <input type="text" class="form-control" id="Code" ng-model="item.Code" required ng-pattern="/^\w{2}-\w{2}$/" />
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-offset-1 col-sm-3">
            <button type="submit" class="btn btn-default" ng-click="save()">Save</button>
            <button type="submit" class="btn btn-default" ng-click="cancel()">Cancel</button>
        </div>
    </div>
</form>